<% if @podcast && @podcast.persisted? %>
  <% title @podcast.title %>

  <%= content_for :page_meta do %>
    <link rel="canonical" href="<%= app_url(@podcast.slug) %>" />
    <meta name="description" content="<%= @podcast.description %>">
    <%= meta_keywords_default %>

    <meta property="og:type" content="article" />
    <meta property="og:url" content="<%= app_url(@podcast.slug) %>" />
    <meta property="og:title" content="<%= @podcast.title %>" />
    <meta property="og:image" content="<%= Settings::General.main_social_image %>">

    <meta property="og:description" content="<%= @podcast.description %>" />
    <meta property="og:site_name" content="<%= community_name %>" />

    <meta name="twitter:card" content="summary_large_image">
    <meta name="twitter:site" content="@<%= Settings::General.social_media_handles["twitter"] %>">
    <meta name="twitter:creator" content="@<%= @podcast.twitter_username %>">
    <meta name="twitter:title" content="<%= @podcast.title %>">
    <meta name="twitter:description" content="<%= @podcast.description %>" />
    <meta name="twitter:image:src" content="<%= Settings::General.main_social_image %>">
  <% end %>
<% else %>
  <% title t("views.podcasts.meta.title") %>
  <%= content_for :page_meta do %>
    <link rel="canonical" href="<%= app_url(pod_path) %>" />
    <meta name="description" content="<%= t("views.podcasts.meta.description", member: community_members_label) %>">
    <%= meta_keywords_default %>

    <meta property="og:type" content="article" />
    <meta property="og:url" content="<%= app_url(pod_path) %>" />
    <meta property="og:title" content="<%= t("views.podcasts.meta.og.title", community: community_name) %>" />
    <meta property="og:image" content="<%= Settings::General.main_social_image %>">

    <meta property="og:description" content="<%= t("views.podcasts.meta.description", member: community_members_label) %>" />
    <meta property="og:site_name" content="<%= community_name %>" />

    <meta name="twitter:card" content="summary_large_image">
    <meta name="twitter:site" content="@<%= Settings::General.social_media_handles["twitter"] %>">
    <meta name="twitter:creator" content="@<%= Settings::General.social_media_handles["twitter"] %>">
    <meta name="twitter:title" content="<%= t("views.podcasts.meta.og.title", community: community_name) %>">
    <meta name="twitter:description" content="<%= t("views.podcasts.meta.description", member: community_members_label) %>" />
    <meta name="twitter:image:src" content="<%= Settings::General.main_social_image %>">
  <% end %>
<% end %>
